package easy;

import java.util.Collections;
import java.util.LinkedList;
import java.util.Map;

public class Solution_703 {

    private int[] array = new int[20002];
    private int min = Integer.MAX_VALUE;
    private int max = Integer.MIN_VALUE;
    private int k;
    private int index = -1;
    private int occurNum = 0;

    public void KthLargest(int k, int[] nums) {
        this.k = k;
        for (int num : nums) {
            int v = num + 10000;
            array[v]++;
            min = Math.min(min, v);
            max = Math.max(max, v);
        }
        int count = 0;
        for (int i = max; i >= 0; i--) {
            count += array[i];
            if (count >= k) {

            }
        }
        index = Math.max(k, count);
    }

    public int add(int val) {
        int v = val + 10000;
        array[v]++;
        min = Math.min(min, v);
        max = Math.max(max, v);

        return 0;
    }

    public static void main(String[] args) {
        Solution_703 model = new Solution_703();
        model.KthLargest(1, new int[]{});
        System.out.println(model.add(-3));
        System.out.println(model.add(-2));
        System.out.println(model.add(-4));
        System.out.println(model.add(0));
        System.out.println(model.add(4));
    }
}
